package com.sec.etech.file.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.Date;

@lombok.Data
@TableName("sys_file_temp")
public class EtechFileTemp implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId("id_")
    protected String id;
    @TableField("create_time_")
    protected Date createTime;
    @TableField("create_by_")
    protected String createBy;
    @TableField("update_time_")
    protected Date updateTime;
    @TableField("update_by_")
    protected String updateBy;
    @TableField("year_")
    private int year;
    @TableField("name_")
    private String name;
    @TableField("module_")
    private String module;
    @TableField("md5")
    private String md5;

    @TableField("uploader_")
    private String uploader;

    @TableField("path_")
    private String path;

    @TableField("rights_json_")
    private String rightsJson;

    @TableField("file_version_")
    protected String fileVersion;
    //最新版本标志：1-是、0-否
    @TableField("latest_")
    private int latest;

    @TableField("preview_")
    private String previewPath;
    @TableField("thumbnail_")
    private String thumbnailPath;

    //文件唯一标识
    @TableField("unique_identifier_")
    private String uniqueIdentifier;

    @TableField("file_type_")
    private String fileType;
    @TableField("file_mime_")
    private String fileMime;
    @TableField("file_length")
    private Long fileLength;

    @TableField("plat_key")
    private String platKey;
    @TableField("plat_page_")
    private String platPage;
    @TableField("plat_value_")
    private String platValue;
    @JsonProperty("当前用户的文件预览权限")
    @TableField(exist = false)
    private boolean hasPreviewRight4currentUser = true;
    @JsonProperty("当前用户的预览文件下载权限")
    @TableField(exist = false)
    private boolean hasPreviewDRight4currentUser = true;
    @JsonProperty("当前用户的原始文件下载权限")
    @TableField(exist = false)
    private boolean hasDownloadRight4currentUser = true;
}
